package xkp.lesson2;

import java.util.ArrayList;
import java.util.List;

public class TestList {
	public static void main(String[] args) {
		String[] arr = {"111","222","333"};
		//使用List的引用指向子类的对象
		List<String> list = new ArrayList<String>();
		list.add("111");
		list.add("222");
		list.add("333");
		System.out.println(list.get(1));
		//System.out.println(list.get(100));
		//System.out.println(arr[100]);
		String str = list.set(0, "000");
		System.out.println(111);
		list.add(0, "saidhsak");
		System.out.println(list.size());
		list.remove(1);
		//迭代器---难点与重点
		
	}

}
